import Vue from 'vue'
import Vuex from 'vuex'
import config from '@/config'
import vuexStorage from '@/util/vuexStorage'
Vue.use(Vuex)
Vue.prototype.$config = config
export default new Vuex.Store({
  state: () => ({
    loading: false
  }),
  getters: {

  },
  mutations: {
    setLoading (state, opt) {
      state.loading = opt
    }
  },
  actions: {

  },
  plugins: [vuexStorage.init(config.storageKeys, config.sessionKeys, config.cookieKeys)]
})
